<?php
/* @var $this JokeContentController */
/* @var $model JokeContent */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'joke-content-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'created_on'); ?>
		<?php echo $form->textField($model,'created_on'); ?>
		<?php echo $form->error($model,'created_on'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'title'); ?>
		<?php echo $form->textField($model,'title',array('size'=>60,'maxlength'=>250)); ?>
		<?php echo $form->error($model,'title'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'text'); ?>
		<?php echo $form->textArea($model,'text',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'text'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'valid'); ?>
		<?php echo $form->dropDownList($model, 'valid', array(0 => 'Invalid', 1 => 'Valid')); ?>
		<?php echo $form->error($model,'valid'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'category_id'); ?>
		<?php echo $form->dropDownList($model,'category_id', CHtml::listData(JokeCategory::model()->findAll(array('order' => 'name')),'id','name'));?>
		<?php echo $form->error($model,'category_id'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'grades_number'); ?>
		<?php echo $form->textField($model,'grades_number'); ?>
		<?php echo $form->error($model,'grades_number'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'grades_total'); ?>
		<?php echo $form->textField($model,'grades_total'); ?>
		<?php echo $form->error($model,'grades_total'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'last_modified_on'); ?>
		<?php echo $form->textField($model,'last_modified_on'); ?>
		<?php echo $form->error($model,'last_modified_on'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'user_id'); ?>
		<?php echo $form->textField($model,'user_id'); ?>
		<?php echo $form->error($model,'user_id'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->